package com.itheima.responsibility;

/**
 * @author zzw
 * @date 2025/10/25
 * @description 责任链模式测试类（客户类）
 */
public class Client {
    public static void main(String[] args) {
        // 创建请假条
        LeaveRequest leaveRequest = new LeaveRequest("小明", 8, "身体不适");

        // 创建各位领导
        GroupLeader groupLeader = new GroupLeader();
        Manager manager = new Manager();
        GeneralManager generalManager = new GeneralManager();

        groupLeader.setNextHandler(manager);
        manager.setNextHandler(generalManager);

        // 提交申请
        groupLeader.submit(leaveRequest);
    }
}
